package vip.xiaonuo.common.config;

import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class AppConfig {
    @Value("${sa-token.sign.secret-key}")
    private String secretKey;

    private static String staticSecretKey;

    @PostConstruct
    public void init() {
        staticSecretKey = this.secretKey;
    }

    public static String getSecretKey() {
        return staticSecretKey;
    }
}
